/* 
 Description:
 ZK Essentials
 History:
 Created by dennis

 Copyright (C) 2012 Potix Corporation. All Rights Reserved.
 */
package com.wanhai.itm.entity;

import com.wanhai.util.UserBean;
import java.io.Serializable;

/**
 * User entity
 */
public class User extends UserBean implements Serializable, Cloneable {

    private static final long serialVersionUID = 1L;
    private String sectionCode;
    private String sectionName;

    public User(String Token) {
        super(Token);
    }

    public String getSectionCode() {
        return sectionCode;
    }

    public void setSectionCode(String sectionCode) {
        this.sectionCode = sectionCode;
    }

    public String getSectionName() {
        return sectionName;
    }

    public void setSectionName(String sectionName) {
        this.sectionName = sectionName;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        User other = (User) obj;
        if (this.getUserCode() == null) {
            if (other.getUserCode() != null) {
                return false;
            }
        } else if (!this.getUserCode().equals(other.getUserCode())) {
            return false;
        }
        return true;
    }

    public static User clone(User user) {
        try {
            return (User) user.clone();
        } catch (CloneNotSupportedException e) {
            //not possible
        }
        return null;
    }
}
